package com.springday3aoptest1;

import com.springday3aoptest1.config.SpringConfig;
import com.springday3aoptest1.domain.Account;
import com.springday3aoptest1.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class App {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);

        AccountService accountService = ctx.getBean(AccountService.class);
//        List<Account> accountList=  accountService.findAll();
        accountService.findById(1);
//        System.out.println(accountList);
    }
}
